#include<iostream>
using namespace std;
typedef long long ll;
const int N = 1e9 + 10;

int main()
{
	int q;
	cin >> q;
	while (q--)
	{
		ll a, b, n, s;
		cin >> a >> b >> n >> s;
		int op = 0;
		for(int i = 0; i <= a&&op==0; i ++ )
			for (int j = 0; j <= b&&op==0; j++)
				if (a * n + b == s)
				{
					puts("yes");
					op = 1;
				}
		if (op == 1) puts("yes");
		else puts("no");
	}
	return 0;
}